﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BerkeleyAlgorithm
{
    public partial class Form2 : Form
    {

        public Form1 f1;
        private NeighbourTable nt;
        public Form2(Form1 f)
        {
            InitializeComponent();
            f1 = f;
            this.nt = new NeighbourTable();
            this.ShowDialog();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            f1.selectionFinished(nt);
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            nt.addNeighbour(textBox1.Text);
            textBox1.Text = string.Empty;
        }
    }
}
